package com.mldong.modules.sys.enums;


import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
import com.mldong.annotation.DictEnum;
import com.mldong.base.CodedEnum;

/**
 * 第三方回调处理类型枚举
 * @author mldong
 * @date 2023/7/4
 */
@DictEnum(key = "sys_third_party_callback_handle_status", name = "第三方回调处理状态")
public enum ThirdPartyCallbackHandleStatusEnum implements CodedEnum {
    UNTREATED(0, "未处理"),
    SUCCESS(1, "处理成功"),
    FAIL(2, "处理失败"),
    ;
    private Integer code;
    private String message;


    @JsonCreator
    public static TaskExecutionQueueStateEnum forValue(Object value) {
        return CodedEnum.codeOf(TaskExecutionQueueStateEnum.class, value).get();
    }

    ThirdPartyCallbackHandleStatusEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
    @JsonValue
    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
